<template>
  <view class="ek-activity-item" @click="$emit('click', item)">
    <view class="picture">
      <image :src="item.banner | banner" class="image" mode="widthFix"></image>
    </view>
    <view>
      <view class="activity-item-title">{{ item.title }}</view>
      <view class="activity-item-desc">
        <image class="icon" src="/static/2images/2_8.png"></image>
        {{ item.address }}</view>
      <view class="activity-item-desc">{{ item.person_num }}人已参加/{{ item.like_number }}收藏</view>
    </view>
  </view>
</template>

<script>
import {str2arr} from "@/utils";

export default {
  name: 'activity-item',
  props: {
    item: {
      type: Object,
      default: null
    }
  },
  filters: {
    banner(val) {
      return str2arr(val)[0]
    }
  }
}
</script>

<style lang="scss">
@import "../user/style.scss";
</style>